<template>
  <div>
    <div v-if="activeIndex == 0">
      <div class="filter-bar">
        <div class="lt" />

        <el-row class="rt" type="flex" justify="end">
          <el-button type="primary" plain size="small" @click="activeIndex = 1"
            >创建考试</el-button
          >
        </el-row>
      </div>

      <!-- 列表 -->
      <List @change="activeIndex = $event" />
    </div>

    <!-- 添加/修改 -->

    <v-info
      v-if="activeIndex == 1"
      ref="vinfo"
      @change="activeIndex = $event"
    />
  </div>
</template>

<script>
import List from "./list.vue";
import vInfo from "./info.vue";
export default {
  name: "Exam",
  components: {
    List,
    vInfo,
  },
  data() {
    return {
      activeIndex: 0,
    };
  },
};
</script>
<style lang="scss" scoped>
.filter-bar {
  padding: 20px;
}
</style>
